package ZiXi;

import java.util.Scanner;

public class Bu0402 {
    public static void main(String[] args) {
        System.out.println("请输入带字母的字符串");
        Scanner str=new Scanner(System.in);
        String s=str.next();
        char[] chars=s.toCharArray();
        boolean jk=false;
        int coubt=0;
        for (int i = 0; i < chars.length; i++) {
            char c=chars[i];
           if(c>='a'&&c<='z') {
               jk=true;
           }else if(c>='A'&&c<='Z') {
               jk=true;
               coubt++;
           }
        }
        if(jk==false){
                System.out.println("输入错误，请重新输入带字母的字符串");
        }
        System.out.println("输入的字符串中含大写字母"+coubt+"个");

    }
}
